<template>
	<view class="">
		<view class="he1 w100pc"></view>
		<!-- 头部 -->
		<view class="fsb lrmg-30" style="height: 100rpx;">
			<image src="/static/image/9.png" style="width:86rpx;height:50rpx" class="" @click="pageback()"></image>
			<view class="flex aic">
			</view>
		</view>
		<view class="w100pc" style="height: 70rpx;"></view>
		<view class="" style="margin: 0 80rpx 100rpx;">
			<view class="gray272 f40">與朋友分享</view>
			<view class="gray272 f40 mg-t-30">星火计划 PLATFORM</view>
		</view>
		<image src="/static/image/20.png" style="width:100%;height:766rpx" class=""></image>
		<view class="fdc aic" style="margin: 100rpx 50rpx 0;" @click="copylink">
			<view class="bra60 fff fcc" style="background: #31B898;width: 100%;height: 80rpx;">
				<view class="">{{url}}</view>
			</view>
			<view class="mg-t-20" style="color: #31B898;">复制分享链接</view>
		</view>
		<view class="he2 w100pc"></view>
	</view>
</template>

<script>
	var	that
	import tabbar from "../../components/tabbar/tabbar.vue"
	import {
		_updataTabBar,
		pageto,
		pageback
	} from "../../common/js/sysfun.js"
	import {
		mapGetters,
		mapMutations
	} from 'vuex'
	export default{
		data(){
			return{
				url:''
			}
		},
		computed: {
			i18n() {
				return this.$t('message');
			},
			...mapGetters([
				'getRequestUrl',
				'getLangType',
				'getTextArr',
				'getLoginInfo'
			])
		},
		onLoad() {
			that = this
			that.get()
		},
		methods:{
			get(){
				that.$postAjax('api/Member/invitation','',function(res){
					console.log(res);
					that.url = that.getRequestUrl + 'h5/#/?rid=' + res.data
				})
			},
			pageto(url, pp) {
				pageto(url, pp);
			},
			pageback(){
				pageback()
			},
			//复制邀请链接
			copylink() {
				uni.setClipboardData({
					data: that.url, //只能是字符串
					success: function () {
						uni.showToast({
							title: '复制成功',
							duration: 2000
						});
					}
				});
			}
		}
	}
</script>

<style>
</style>